Julia数据科学系列-Distances包
- Distances.jl
- Euclidean distance
- Periodic Euclidean distance
- Cityblock distance/Manhattan distance
- Total variation distance
- Jaccard distance
- Rogers-Tanimoto distance
- Chebyshev distance
- Minkowski distance
- Hamming distance
- Cosine distance
- Correlation distance
- Chi-square distance
- Kullback-Leibler divergence
- Generalized Kullback-Leibler divergence
- Rényi divergence
- Jensen-Shannon divergence
- Mahalanobis distance
- Squared Mahalanobis distance
- Bhattacharyya distance
- Hellinger distance
- Haversine distance
- Spherical angle distance
- Mean absolute deviation
- Mean squared deviation
- Root mean squared deviation
- Normalized root mean squared deviation
- Bray-Curtis dissimilarity
- Bregman divergence
- StringDistances.jl
Distances.jl
https://github.com/JuliaStats/Distances.jl
https://cloud.tencent.com/developer/article/1800908
Euclidean distance
Squared Euclidean distance
平方欧氏距离
: 许多应用中, 在计算欧氏距离的时候省略最后的开平方比较方便。
平方欧式距离在统计中很重要, 用于最小二乘法。
平方距离在优化理论中是首选, 因为允许使用凸分析。
Periodic Euclidean distance
我很少用到, 略。
Cityblock distance/Manhattan distance
Total variation distance
总变差距离, 主要应用在概率论中, 也叫统计距离(statistical distance)
或变差距离(variation distance)
Jaccard distance
两个集合中不同的元素占并集元素的比例杰卡德距离是用来衡量两个集合差异性的指标, 是杰卡德相似系数的补集: \( 1 - J_{index}\).
Rogers-Tanimoto distance
Chebyshev distance
Minkowski distance
Hamming distance
Cosine distance
Correlation distance
Chi-square distance
Kullback-Leibler divergence
Generalized Kullback-Leibler divergence
Rényi divergence
Jensen-Shannon divergence
Mahalanobis distance
Squared Mahalanobis distance
Bhattacharyya distance
Hellinger distance
Haversine distance
Spherical angle distance
Mean absolute deviation
Mean squared deviation
Root mean squared deviation
Normalized root mean squared deviation
Bray-Curtis dissimilarity
Bregman divergence
StringDistances.jl
https://github.com/matthieugomez/StringDistances.jl
Edit Distances
Hamming Distance
Hamming() <: SemiMetric
Jaro and Jaro-Winkler Distance
Jaro()
JaroWinkler() <: SemiMetric
Levenshtein Distance
Levenshtein() <: Metric
Optimal String Alignment Distance (a.k.a. restricted Damerau-Levenshtein)
OptimalStringAlignment() <: SemiMetric
Damerau-Levenshtein Distance
DamerauLevenshtein() <: Metric
RatcliffObershelp Distance
RatcliffObershelp() <: SemiMetric
Q-gram distances
which compare the set of all substrings of length q
in each string
QGram Distance
QGram(q::Int) <: SemiMetric
Cosine Distance
Cosine(q::Int) <: SemiMetric
Jaccard Distance
Jaccard(q::Int) <: SemiMetric
Overlap Distance
Overlap(q::Int) <: SemiMetric
Sorensen-Dice Distance
SorensenDice(q::Int) <: SemiMetric
MorisitaOverlap Distance
MorisitaOverlap(q::Int) <: SemiMetric
Normalized Multiset Distance
NMD(q::Int) <: SemiMetric